package com.ruoyi.activiti.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.activiti.mapper.SpecialRulesMapper;
import com.ruoyi.activiti.domain.SpecialRules;
import com.ruoyi.activiti.service.ISpecialRulesService;
import com.ruoyi.common.core.text.Convert;

/**
 * 特殊人员出勤规则Service业务层处理
 * 
 * @author lifan
 * @date 2021-04-12
 */
@Service
public class SpecialRulesServiceImpl implements ISpecialRulesService 
{
    @Autowired
    private SpecialRulesMapper specialRulesMapper;

    /**
     * 查询特殊人员出勤规则
     * 
     * @param id 特殊人员出勤规则ID
     * @return 特殊人员出勤规则
     */
    @Override
    public SpecialRules selectSpecialRulesById(Long id)
    {
        return specialRulesMapper.selectSpecialRulesById(id);
    }

    /**
     * 查询特殊人员出勤规则列表
     * 
     * @param specialRules 特殊人员出勤规则
     * @return 特殊人员出勤规则
     */
    @Override
    public List<SpecialRules> selectSpecialRulesList(SpecialRules specialRules)
    {
        return specialRulesMapper.selectSpecialRulesList(specialRules);
    }

    /**
     * 新增特殊人员出勤规则
     * 
     * @param specialRules 特殊人员出勤规则
     * @return 结果
     */
    @Override
    public int insertSpecialRules(SpecialRules specialRules)
    {
        return specialRulesMapper.insertSpecialRules(specialRules);
    }

    /**
     * 修改特殊人员出勤规则
     * 
     * @param specialRules 特殊人员出勤规则
     * @return 结果
     */
    @Override
    public int updateSpecialRules(SpecialRules specialRules)
    {
        return specialRulesMapper.updateSpecialRules(specialRules);
    }

    /**
     * 删除特殊人员出勤规则对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSpecialRulesByIds(String ids)
    {
        return specialRulesMapper.deleteSpecialRulesByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除特殊人员出勤规则信息
     * 
     * @param id 特殊人员出勤规则ID
     * @return 结果
     */
    @Override
    public int deleteSpecialRulesById(Long id)
    {
        return specialRulesMapper.deleteSpecialRulesById(id);
    }
}
